package com.wind.controller;

import com.wind.pojo.Dept;
import com.wind.pojo.Result;
import com.wind.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    private DeptService deptService;


    @GetMapping("/dept")
    Result getAllDept() {
        List<Dept> depts = deptService.getAllDept();
        System.out.println(depts);
        return Result.success("success", depts);
    }
}
